<template>
    <div>
        订单模块页面组件
        <p @click="addOrderNum">订单数量 orderNum:{{ orderStore.orderNum }}</p>
        <p @click="addPrice">订单信息: {{ orderinfo.name }}--{{ orderinfo.price }}</p>
    </div>
</template>

<script setup>
// 引入order 模块数据
import { useOrderStore } from '@/store/orderStore.js'
const orderStore = useOrderStore()
console.log(orderStore)
const { orderinfo } = orderStore

const addOrderNum = () => {
    orderStore.orderNum++
}

const addPrice = () => {
    orderinfo.price += 100
}
</script>
<style scoped>

</style>